Problem: $f(x) = |2x-6|$ Evaluate the definite integral. $\int^4_{0}f(x)\,dx = $ Choose 1 answer: Choose 1 answer: (Choice A) A $9$ (Choice B) B $10$ (Choice C) C $12$ (Choice D) D $18$
Solution: Splitting up the absolute value Notice that the absolute value function is a piecewise function. Here we have that: $f(x) = \begin{cases} 2x -6 & \text{for} ~~~~x\geq3 \\ 6-2x & \text{for} ~~~~ x \lt3\end{cases}$ Splitting up the definite integral Since we're working with a piecewise function, we need to split the definite integral up into two pieces: $\phantom{=} \int^4_{0}f(x)\,dx$ $= \int^4_{3}f(x)\,dx + \int^3_{0}f(x)\,dx~~~~~~$ [Why did we split at 3?] $= \int^4_{3}(2x - 6)\,dx + \int^3_{0}(6-2x)\,dx ~~~~~~$ Evaluating each piece Next, let's evaluate each of these definite integrals one at a time. The first definite integral: $\begin{aligned} \int^4_{3}(2x - 6)\,dx~ &=x^2 - 6x\Bigg|^4_{{3}} \\\\ &= \left[ ( 4)^2 - 6\cdot(4) \right] - \left[({3})^2 - 6\cdot ({3}) \right] \\\\ &= \left[-8\right] -\left[-9 \right] \\\\ &= {1}\end{aligned}$ The second definite integral: $\begin{aligned} \int^3_{0}(6-2x)\,dx~ &=6x-x^2\Bigg|^3_{{0}} \\\\ &= \left[6\cdot(3) - ( 3)^2 \right] - \left[ 6\cdot({0})-({0})^2 \right] \\\\ &= \left[9\right] -\left[0 \right] \\\\ &= {9}\end{aligned}$ Putting the pieces together Now let's add these two pieces together to find the answer: $\phantom{=} \int^4_{3}(2x - 6)\,dx + \int^3_{0}(6-2x)\,dx$ $ = {1} + {9}$ $ = 10$ The answer $\int^3_{0}f(x)\,dx = 10$